package com.example.floatingpopulation.service.impl;

import com.example.floatingpopulation.entity.Upload;
import com.example.floatingpopulation.mapper.UploadMapper;
import com.example.floatingpopulation.service.UploadService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;

@Slf4j
@Service
public class UploadServiceImpl implements UploadService {

    @Autowired
    UploadMapper uploadMapper;

    @Override
    public void saveUploadInfo(String name, String path) {
        Upload upload = new Upload();
        upload.setName(name);
        upload.setPath(path);
        upload.setCreateTime(new Date());
        uploadMapper.saveUpload(upload);
    }
}
